gdkwindow-x11: Correct math for filling in the _NET_WM_OPAQUE_REGION property
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 31 Aug 2013 17:21:09 +0000 (13:21 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 31 Aug 2013 17:21:09 +0000 (13:21 -0400)
This fixes incorrect rendering under mutter and other WMs that implement
_NET_WM_OPAQUE_REGION.

gdk/x11/gdkwindow-x11.c

index a88cf8e242169c6ae8d3ec7fde4f892885570542..e5b3ffecca5c429ca1d3865019496c6c2a7e5a29 100644 (file)
@@ -5576,10 +5576,10 @@ gdk_x11_window_set_opaque_region (GdkWindow      *window,
         {
           cairo_rectangle_int_t rect;
           cairo_region_get_rectangle (region, i, &rect);
-          data[i+0] = rect.x;
-          data[i+1] = rect.y;
-          data[i+2] = rect.width;
-          data[i+3] = rect.height;
+          data[i*4+0] = rect.x;
+          data[i*4+1] = rect.y;
+          data[i*4+2] = rect.width;
+          data[i*4+3] = rect.height;
         }
     }
   else